<?php
    $host = "https://ali-deliver.showapi.com";
    $path = "/fetchCom";
    $method = "GET";
    $appcode = "099e286e9e1d4474a82ecc7c76ce11de";
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);
    $querys = "nu=426648211796";
    $bodys = "";
    $url = $host . $path . "?" . $querys;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, true);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
   $re =  curl_exec($curl);
  curl_close($curl);
  $re2 = substr($re,strpos($re,'{'));
 
  $res = json_decode($re2);
  //订单路径
  $name= $res->showapi_res_body->data[0]->simpleName;

   
    $path = "/showapi_expInfo";
    
   
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);
    $querys = "com=$name&nu=426648211796";
    $bodys = "";
    $url = $host . $path . "?" . $querys;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, true);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
     $result =  curl_exec($curl);
     $re3 = substr($result,strpos($result,'{'));
     $ress = json_decode($re3);
     $querys = $ress->showapi_res_body->data;
     
    var_dump($querys);
  //订单路径
    
?>